﻿<local:BaseWindow
    x:Class="LenovoLegionToolkit.WPF.Windows.KeyboardBacklight.Spectrum.SpectrumKeyboardBacklightEditEffectWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="clr-namespace:LenovoLegionToolkit.WPF.Controls"
    xmlns:local="clr-namespace:LenovoLegionToolkit.WPF.Windows"
    xmlns:resources="clr-namespace:LenovoLegionToolkit.WPF.Resources"
    xmlns:utils="clr-namespace:LenovoLegionToolkit.WPF.Utils"
    xmlns:wpfui="http://schemas.lepo.co/wpfui/2022/xaml"
    Title="{x:Static resources:Resource.SpectrumKeyboardBacklightEditEffectWindow_Title_Edit}"
    Width="500"
    Height="500"
    MinWidth="500"
    MinHeight="500"
    FlowDirection="{x:Static utils:LocalizationHelper.Direction}"
    ResizeMode="CanMinimize"
    ShowInTaskbar="False"
    WindowStartupLocation="CenterOwner">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <wpfui:TitleBar
            x:Name="_titleBar"
            Grid.Row="0"
            CanMaximize="false"
            ShowMaximize="false"
            ShowMinimize="false"
            UseSnapLayout="false" />

        <Grid
            Grid.Row="0"
            Height="24"
            Margin="12,8,12,8">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>

            <TextBlock
                x:Name="_title"
                Grid.Column="0"
                VerticalAlignment="Center"
                FontSize="12"
                IsHitTestVisible="False"
                Text="{x:Static resources:Resource.SpectrumKeyboardBacklightEditEffectWindow_Title_Edit}" />
        </Grid>

        <wpfui:DynamicScrollViewer Grid.Row="1" Margin="12,0,0,0">
            <StackPanel Margin="0,0,16,0">

                <wpfui:CardControl x:Name="_effectTypeCard" Margin="0,0,0,8">
                    <wpfui:CardControl.Header>
                        <controls:CardHeaderControl x:Name="_effectTypeCardHeader" Title="{x:Static resources:Resource.SpectrumKeyboardBacklightEditEffectWindow_Effect_Title}" />
                    </wpfui:CardControl.Header>
                    <ComboBox
                        x:Name="_effectTypeComboBox"
                        MinWidth="160"
                        Margin="0,0,0,8"
                        MaxDropDownHeight="Auto"
                        SelectionChanged="EffectsComboBox_SelectionChanged" />
                </wpfui:CardControl>

                <wpfui:CardControl x:Name="_directionCard" Margin="0,0,0,8">
                    <wpfui:CardControl.Header>
                        <controls:CardHeaderControl Title="{x:Static resources:Resource.SpectrumKeyboardBacklightEditEffectWindow_Direction_Title}" />
                    </wpfui:CardControl.Header>
                    <ComboBox
                        x:Name="_directionComboBox"
                        MinWidth="160"
                        Margin="0,0,0,8"
                        MaxDropDownHeight="Auto" />
                </wpfui:CardControl>

                <wpfui:CardControl x:Name="_clockwiseDirectionCard" Margin="0,0,0,8">
                    <wpfui:CardControl.Header>
                        <controls:CardHeaderControl Title="{x:Static resources:Resource.SpectrumKeyboardBacklightEditEffectWindow_ClockwiseDirection_Title}" />
                    </wpfui:CardControl.Header>
                    <ComboBox
                        x:Name="_clockwiseDirectionComboBox"
                        MinWidth="160"
                        Margin="0,0,0,8"
                        MaxDropDownHeight="Auto" />
                </wpfui:CardControl>

                <wpfui:CardControl x:Name="_speedCard" Margin="0,0,0,8">
                    <wpfui:CardControl.Header>
                        <controls:CardHeaderControl Title="{x:Static resources:Resource.SpectrumKeyboardBacklightEditEffectWindow_Speed_Title}" />
                    </wpfui:CardControl.Header>
                    <ComboBox
                        x:Name="_speedComboBox"
                        MinWidth="160"
                        Margin="0,0,0,8"
                        MaxDropDownHeight="Auto" />
                </wpfui:CardControl>

                <wpfui:CardControl x:Name="_singleColor" Margin="0,0,0,8">
                    <wpfui:CardControl.Header>
                        <controls:CardHeaderControl Title="{x:Static resources:Resource.SpectrumKeyboardBacklightEditEffectWindow_Color_Title}" />
                    </wpfui:CardControl.Header>
                    <controls:ColorPickerControl x:Name="_singleColorPicker" />
                </wpfui:CardControl>

                <wpfui:CardControl x:Name="_multiColors" Margin="0,0,0,8">
                    <wpfui:CardControl.Header>
                        <controls:CardHeaderControl Title="{x:Static resources:Resource.SpectrumKeyboardBacklightEditEffectWindow_Colors_Title}" />
                    </wpfui:CardControl.Header>
                    <controls:MultiColorPickerControl x:Name="_multiColorPicker" />
                </wpfui:CardControl>

            </StackPanel>
        </wpfui:DynamicScrollViewer>

        <StackPanel
            Grid.Row="2"
            Margin="12"
            HorizontalAlignment="Right"
            Orientation="Horizontal">
            <wpfui:Button
                MinWidth="120"
                Appearance="Primary"
                Click="Apply_Click"
                Content="{x:Static resources:Resource.Apply}" />
            <wpfui:Button
                MinWidth="120"
                Margin="8,0,0,0"
                Click="Cancel_Click"
                Content="{x:Static resources:Resource.Cancel}" />
        </StackPanel>

    </Grid>
</local:BaseWindow>
